package com.itheima.health.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
//分页插件配置类
//每个模块都有分页查询功能所以定义到core最合适，
//其他服务只要依赖他就可以了
@Configuration
public class PageHelperConfig {

    //生成分页拦截器
    @Bean
    public PaginationInterceptor paginationInterceptor(){
        return new PaginationInterceptor();
    }

}
